<?php
/**
 * 靓号逻辑处理类
 */
 class Protty{
	protected $pro,$pro_des;
	function __construct(){
		$this->pro = M('product');
		$this->pro_des = M('product_description');
	}
	
	/**
	 * 显示靓号
	 */ 
	function show(){
		$where['id'] = array('EGT',20000);
		$res = $this->pro->field('id')-> where($where) ->limit('10')->select();
		$ret = array();
		foreach($res as $v){
			$where['product_id'] = $v['id'];
			$ret[] = $this->pro_des->where($where) ->select();
		}
		//return $ret;
		$where2['product_id'] = array('EGT',20000);
		$arr = $this->pro_des->where($where2) ->field('product_id,name')->limit('10')->select();
		return $arr;
	}
  }